﻿namespace Genesis.Infrastructure.Application.Specifications
{

    public class NotSpecification : Specification
    {

        private ISpecification primary;

        public NotSpecification(ISpecification primary)
        {

            this.primary = primary;

        }

        public override bool IsSatisfiedBy(object candidate)
        {

            return !primary.IsSatisfiedBy(candidate);

        }

    }

}